package com.house.framework.utils;

import lombok.Data;

/**
 * @ClassName AjaxResult
 * @Version 1.0
 */
@Data
public class AjaxResult {
    private Boolean success = true;
    private String msg = "操作成功！";
    private Object resultObj;
    /**
     *@Description 返回本身对象
     *@Param
     *@Return 
     */
    public static AjaxResult me() {
        return new AjaxResult();
    }

    public AjaxResult setMsg(String msg) {
        this.success = false;
        this.msg = msg;
        return this;
    }

    public AjaxResult setResultObj(Object resultObj) {
        this.resultObj = resultObj;
        return this;
    }
    public AjaxResult setSuccess(boolean success) {
        this.success = success;
        return this;
    }
}
